﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Administrator/MasterPage.master" AutoEventWireup="false" CodeFile="frmLogTran.aspx.vb" Inherits="Administrator_frmLogTran" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
        <script type="text/javascript">
            $(document).ready(function () {

                Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                $("input[id$=txtStartDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                    yearAddToDisplay: 543,
                    dateFormat: 'dd/mm/yy',
                    showOn: "button",
                    buttonImage: "../img/calendar.gif",
                    buttonImageOnly: true
                }));
                $("input[id$=txtEndDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                    yearAddToDisplay: 543,
                    dateFormat: 'dd/mm/yy',
                    showOn: "button",
                    buttonImage: "../img/calendar.gif",
                    buttonImageOnly: true
                }));
                function EndRequestHandler(sender, args) {
                    $("input[id$=txtStartDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                        yearAddToDisplay: 543,
                        dateFormat: 'dd/mm/yy',
                        showOn: "button",
                        buttonImage: "../img/calendar.gif",
                        buttonImageOnly: true
                    }));
                    $("input[id$=txtEndDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                        yearAddToDisplay: 543,
                        dateFormat: 'dd/mm/yy',
                        showOn: "button",
                        buttonImage: "../img/calendar.gif",
                        buttonImageOnly: true
                    }));

                }

            });
    </script>
          <table style="width:100%;">
                <tr>
                    <td style="text-align: right"  >
                        โปรแกรม :</td>
                    <td style="text-align: left" >
                        <asp:DropDownList ID="ddlProgram" runat="server" Height="25px" Width="201px">
                        </asp:DropDownList>
                    </td>
                     <td style="text-align: right">รหัส :</td>
                      <td align="left">
                          <asp:TextBox ID="txtUnique" runat="server" AutoCompleteType="Disabled" 
                              CssClass="control" Height="20px" style="margin-bottom: 0px" Width="178px"></asp:TextBox>
                    </td>
                       <td style="text-align: right">รหัสผู้ใช้งาน : </td>
                         <td align="left">
                             <asp:TextBox ID="txtUserName" runat="server" AutoCompleteType="Disabled" 
                                 CssClass="control" Height="20px" style="margin-bottom: 0px" Width="200px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right">
                        ประเภท :</td>
                    <td style="text-align: left">
                        <asp:CheckBox ID="chkSearch" runat="server" Text="สอบถาม" />
                        <asp:CheckBox ID="chkAdd" runat="server" Text="เพิ่ม" />
                        <asp:CheckBox ID="chkEdit" runat="server" Text="แก้ไข" />
                        <asp:CheckBox ID="chkDelete" runat="server" Text="ลบ" />
                        <asp:CheckBox ID="chkPrint" runat="server" Text="พิมพ์" />
                    </td>
                    <td style="text-align: right">
                        วันที่ :</td>
                    <td style="text-align: left">
                        <asp:TextBox ID="txtStartDate" runat="server" AutoCompleteType="Disabled" 
                            Height="20px" Width="183px"></asp:TextBox>
                    </td>
                    <td style="text-align: right">
                        ถึง</td>
                    <td style="text-align: left">
                        <asp:TextBox ID="txtEndDate" runat="server" AutoCompleteType="Disabled" 
                            Height="20px" Width="180px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right; height: 26px;">
                        รายละเอียด :</td>
                    <td style="text-align: left; height: 26px;">
                        <asp:TextBox ID="txtDescription" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" style="margin-bottom: 0px" Width="200px"></asp:TextBox>
                    </td>
                    <td style="text-align: right; height: 26px;">
                        &nbsp;</td>
                    <td style="text-align: left; height: 26px;">
                        &nbsp;</td>
                    <td style="text-align: right; height: 26px;">
                        &nbsp;</td>
                    <td style="text-align: left; height: 26px;">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td colspan="6" style="text-align: right">
                        <asp:Button ID="btnSearch" runat="server" CssClass="control" Text="search" 
                            Width="80px" />
                        <asp:Button ID="btnPrint" runat="server" CssClass="control" Text="พิมพ์" 
                            Width="80px" Visible="False" />
                    </td>
                </tr>
           </table>
            <div align="center">
                   <asp:Label ID="lblMsg" runat="server" CssClass="control" Font-Size="XX-Large" 
                            ForeColor="Red" Height="30px" Visible="False" Font-Bold="True"></asp:Label>
                        <asp:GridView ID="gvLogTran" runat="server" AllowSorting="True" 
                            AutoGenerateColumns="False" CellPadding="4" CssClass="control" 
                            ForeColor="#333333" Width="100%" AllowPaging="True">
                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <Columns>
                                <asp:BoundField DataField="uniqueid" HeaderText="รหัส" ReadOnly="True" 
                                    SortExpression="uniqueid">
                                <ItemStyle HorizontalAlign="Left" Width="120px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="UpdateBy" HeaderText="รหัสผู้ใช้งาน" 
                                    SortExpression="UpdateBy">
                                <ItemStyle HorizontalAlign="Left" Width="110px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="TranNAME" HeaderText="ประเภท" 
                                    SortExpression="TranNAME">
                                <ItemStyle Width="100px" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Description" 
                                    HeaderText="รายละเอียด" SortExpression="Description">
                                <ItemStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="LogDate" HeaderText="วันที่ทำรายการ" ReadOnly="True" 
                                    SortExpression="LogDate">
                                <ItemStyle Width="140px" HorizontalAlign="Left" />
                                </asp:BoundField>
                            </Columns>
                            <FooterStyle BackColor="#E38120" Font-Bold="True" ForeColor="White" />
                            <RowStyle ForeColor="#333333" />
                            <PagerSettings Mode="NumericFirstLast" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" 
                    CssClass="cssPager" />
                            <SelectedRowStyle BackColor="#FFFFCC" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#E38120" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView> 
             </div>
            <div align="right">
                   <asp:Label ID="lblTotal" runat="server" Font-Bold="True" ForeColor="#003300"></asp:Label>
             </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

